<template>
  <div class="home">
    <keep-alive include="find">
      <router-view></router-view>
    </keep-alive>

    <!-- <van-tabbar
      v-model="active"
      class="tabbar"
      active-color="#e40137"
      inactive-color="#b4b4bd"
    > -->
    <van-tabbar
      route
      class="tabbar"
      active-color="#e40137"
      inactive-color="#b4b4bd"
      placeholder
      v-if="$route.meta.needTab"
    >
      <van-tabbar-item to="/home/company">
        <template #default>
          <div class="title">公司</div>
        </template>
        <template #icon>
          <i class="iconfont fi">&#xe63d;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/question">
        <template #default>
          <div class="title">刷题</div>
        </template>
        <template #icon>
          <i class="iconfont fi">&#xe63f;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/find">
        <template #default>
          <div class="title">发现</div>
        </template>
        <template #icon>
          <i class="iconfont fi">&#xe646;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/my">
        <template #default>
          <div class="title">我的</div>
        </template>
        <template #icon>
          <i class="iconfont fi">&#xe64b;</i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  name: 'home',
  data () {
    return {
      active: 3
    }
  }
}
</script>
<style lang="less" scoped>
.home {
  height: 100%;
  .tabbar {
    height: 70px;
  }
  .fi {
    font-size: 28px;
  }
}
</style>
